﻿namespace DataGridSample
{
    using System;
    using System.ComponentModel.DataAnnotations;
    using Codeplex.Reactive;

    public class PersonViewModel
    {
        [Required(ErrorMessage = "Required FirstName")]
        [Display(Name = "First Name")]
        [UIHint("System.Windows.Controls.DataGridCheckBoxColumn")]
        public ReactiveProperty<string> FirstName { get; private set; }
        [Display(Name = "Last Name")]
        public ReactiveProperty<string> LastName { get; private set; }
        [Display(Name = "誕生日")]
        public ReactiveProperty<DateTime> Birthday { get; private set; }
        [Display(Name = "年齢")]
        public ReactiveProperty<int> Age { get; private set; }

        public PersonViewModel()
        {
            this.FirstName = new ReactiveProperty<string>()
                .SetValidateAttribute(() => FirstName);
            this.LastName = new ReactiveProperty<string>();
            this.Birthday = new ReactiveProperty<DateTime>();
            this.Age = new ReactiveProperty<int>();
            
        }
    }
}
